<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <!DOCTYPE html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <!-- 第一步 引入mui css -->
        <link rel="stylesheet" href="./assets/mui/css/mui.css">
        <!-- 第二步引入我们的base.css -->
        <link rel="stylesheet" href="./css/base.css">
        <link rel="stylesheet" href="./assets/fontAwesome/css/font-awesome.min.css">



    </head>

<body>
    <div class="mui-inner-wrap">
        <!-- 主页面标题   头部-->
        <header class="mui-bar mui-bar-nav  header">
            <a class="mui-icon mui-action-menu   mui-icon-search mui-pull-right"></a>

            <h1 class="mui-title">嗨淘代购个人中心</h1>
        </header>



        <!-- 底部导航栏 -->
        <nav class="mui-bar mui-bar-tab  footer">
            <a class="mui-tab-item mui-active" href="#tabbar">
                <span class="mui-icon mui-icon-home"></span>
                <span class="mui-tab-label">首页</span>
            </a>
            <a class="mui-tab-item" href="#tabbar-with-chat">
                <span class="mui-icon mui-icon-bars"></span>
                <span class="mui-tab-label">分类</span>
            </a>
            <a class="mui-tab-item" href="#tabbar-with-contact">
                <!-- <span class="mui-icon mui-icon-contact"></span> -->
                <span class=" mui-icon  fa fa-shopping-cart"></span>
                <span class="mui-tab-label">购物</span>
            </a>
            <a class="mui-tab-item" href="#tabbar-with-map">
                <span class="mui-icon  mui-icon-person"></span>
                <span class="mui-tab-label">个人中心</span>
            </a>
        </nav>

        <!-- 主体内容部分 -->
        <div class="mui-content mui-scroll-wrapper">
            <div class="mui-scroll">
                <ul class="mui-table-view">
                    <li class="mui-table-view-cell mui-media">
                        <a href="javascript:;" class="mui-navigate-right">
                            <img class="mui-media-object mui-pull-left" src="./images/user.jpg">
                            <div class="mui-media-body">
                                幸福
                                <p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
                            </div>
                        </a>
                    </li>

                </ul>
                <ul class="mui-table-view">
                    <li class="mui-table-view-cell">
                        <a class="mui-navigate-right">Item 1</a>
                    </li>
                    <li class="mui-table-view-cell">
                        <a class="mui-navigate-right">Item 2</a>
                    </li>
                    <li class="mui-table-view-cell">
                        <a class="mui-navigate-right">Item 3</a>
                    </li>

                    <li class="mui-table-view-cell">
                        <a class="mui-text-center" id='loginOut' href="#">退出登录</a>
                    </li>
                </ul>


            </div>
        </div>


        <script src="./assets/mui/js/mui.min.js"></script>
        <script src="./assets/zepto/zepto.min.js"></script>
        <script src="./js/common.js"></script>

        <script>
            /*初始化区域滚动组件 当超过了父容器大小的时候生效*/
            mui('.mui-scroll-wrapper').scroll();
        </script>



        <script>
            $.ajax({
                url: '/user/queryUserMessage',
                async: false,
                success: function (res) {
                    console.log(res);
                    if (res.error && res.error == 400) {
                        window.location.href = './login.html'
                    }
                }
            })










            $('#loginOut').on('click', function () {
                // alert(1)
                $.ajax({
                    url: '/user/logout',
                    success: function (res) {
                        console.log(res);
                        if (res.success) {
                            setTimeout(function () {
                                window.location.href = './index.html'
                            }, 2000)
                        }

                    }
                })
            })
        </script>
</body>

</html>